(chrome.extension.onMessage || chrome.extension.onRequest).addListener(
function(message, sender, sendResponse)
{
	if(message.name && message.name == "sessionSwitched")
		location.reload(); //TODO Save and restore states
	sendResponse();
});

